Class CustomEffect<T>
Custom effect for OdinNative.Wrapper.MediaPipeline callbacks
Inheritance: System.Object -> OdinNative.Wrapper.Media.PipelineEffect
Implements:
OdinNative.Wrapper.Media.IPipelineEffect
Methods
~CustomEffect()
Insert(uint, PipelineCallback<T>, T)
Add a OdinNative.Wrapper.Media.CustomEffect to OdinNative.Wrapper.Media.PipelineEffect.Parent pipeline.
Returns
System.UInt32: effect id
Parameters
| Type | Name | Description |
|---|---|---|
System.UInt32 | index | effect index in pipeline |
| OdinNative.Core.Imports.NativeBindings.PipelineCallback<T> | callback | effect event |
<T> | userData | Will be passed to callback on each invocation |
SerializeUserdata(T)
Serialize arbitrary userdata
Returns
System.Byte[]: byte array representation of userdata value
Parameters
| Type | Name | Description |
|---|---|---|
<T> | value | byte array data of value T |
SerializeUserdata(T, bool)
Serialize arbitrary userdata
Returns
System.IntPtr
Parameters
| Type | Name | Description |
|---|---|---|
<T> | value | object data of value T |
System.Boolean | destroy | true to call the DestroyStructure(IntPtr, Type) method. |
DeserializeUserdata(byte[])
Deserializes userdata from a byte array
Returns
<T>: deserialized userdata value of type T
Parameters
| Type | Name | Description |
|---|---|---|
System.Byte[] | data | custom userdata |
DeserializeUserdata(nint)
Deserializes userdata from a pointer
Returns
<T>: deserialized userdata value of type T
Parameters
| Type | Name | Description |
|---|---|---|
System.IntPtr | ptr | pointer |
Create(MediaPipeline, PipelineCallback<T>, T)
Insert a custom effect in the specified pipeline
Returns
OdinNative.Wrapper.Media.CustomEffect<T>: Instance of OdinNative.Wrapper.Media.CustomEffect
Parameters
| Type | Name | Description |
|---|---|---|
| OdinNative.Wrapper.MediaPipeline | pipeline | where to create a custom effect |
| OdinNative.Core.Imports.NativeBindings.PipelineCallback<T> | callback | delegate reference for effect event |
<T> | userData | custom userdata passed to callback on each invocation |
Serialize(T)
Serialize structure to pointer for arbitrary data T
Returns
System.Byte[]: byte array representation of data structure
Parameters
| Type | Name | Description |
|---|---|---|
<T> | value | data T structure |
Serialize(T, bool)
Serialize structure to pointer for arbitrary data T
Returns
System.IntPtr: pointer of data structure
Parameters
| Type | Name | Description |
|---|---|---|
<T> | value | data T structure |
System.Boolean | destroy | free value |
Deserialize(byte[])
Deserializes a structure from a byte array
Returns
<T>: structure T
Parameters
| Type | Name | Description |
|---|---|---|
System.Byte[] | data | binary data to deserialize |
Deserialize(nint)
Deserializes a structure from a pointer
Returns
<T>: structure T
Parameters
| Type | Name | Description |
|---|---|---|
System.IntPtr | ptr | pointer to deserialize as structure |